package org.createModel.factory.abstract_factory;

public class ClientTest {
    public static void main(String[] args) {
        CoffeeStore store = new CoffeeStore();
        DessertFactory factory = new AmericanDessertDessertFactory();
        store.setFactory(factory);
        Coffee coffee = store.orderCoffee();
        store.orderDessert();
        System.out.println(coffee.getName());

        factory = new LatteDessertDessertFactory();
        store.setFactory(factory);
        coffee = store.orderCoffee();
        store.orderDessert();
        System.out.println(coffee.getName());
    }
}
